<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2017 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: Dean <zxxjjforever@163.com>
// +----------------------------------------------------------------------
// API 模板文件，可以复制
namespace api\resource\controller;

use think\Db;
use think\Request;
use think\Validate;
use cmf\controller\RestBaseController;

class Biao19Controller extends RestBaseController
{


    public function one($data)
    {

        //查 这个表的数据
        @$new_data = $data[0]['content'];
        if (empty($new_data)) {
            return '';
        }

        @$text1 = $new_data->text1;
        @$text1 = json_decode($text1);

        @$text2 = $new_data->text2;
        @$text2 = json_decode($text2);

       $html = '
            <div style="width: 1200px;margin: 0 auto;">
            <div style="font-size: 16px;font-weight: 600;margin-bottom: 15px;">六、项目组人员情况</div>
            <table border="1" cellspacing="0px" cellpadding="5px" width="1200">
                <tbody>
                <tr>
                    <td colspan="10">项目负责人</td>
                </tr>
                <tr>
                    <td>序号</td>
                    <td>*姓名</td>
                    <td>*职称</td>
                    <td>*职务</td>
                    <td>*最高学位</td>
                    <td>*现从事专业</td>
                    <td>*所在单位</td>
                    <td>*身份证件号码</td>
                    <td>*在本项目中承担的工作任务</td>
                    <td>签名</td>
                </tr>';
                @$i = 1;
                foreach (@$text1 as $v) {

                    $html .='
                    <tr>
                        <td>'.@$i.'</td>
                        <td>'.@$v->text1.'</td>
                        <td>'.@$v->text2.'</td>
                        <td>'.@$v->text3.'</td>
                        <td>'.@$v->text4.'</td>
                        <td>'.@$v->text5.'</td>
                        <td>'.@$v->text6.'</td>
                        <td>'.@$v->text7.'</td>
                        <td>'.@$v->text8.'</td>
                        <td>'.@$v->text9.'</td>
                    </tr>
                    ';
                    $i++;

                }

                $html .='
                <tr>
                    <td colspan="10">主要参与人员</td>
                </tr>
                <tr>
                    <td>序号</td>
                    <td>*姓名</td>
                    <td>职称</td>
                    <td>职务</td>
                    <td>学位</td>
                    <td>现从事专业</td>
                    <td>*所在单位</td>
                    <td>*身份证件号码</td>
                    <td>在本项目中承担的工作任务</td>
                    <td>签名</td>
                </tr>';

                @$i = 1;
                foreach (@$text2 as $v) {
                    $html .='
                    <tr>
                        <td>'.@$i.'</td>
                        <td>'.@$v->text1.'</td>
                        <td>'.@$v->text2.'</td>
                        <td>'.@$v->text3.'</td>
                        <td>'.@$v->text4.'</td>
                        <td>'.@$v->text5.'</td>
                        <td>'.@$v->text6.'</td>
                        <td>'.@$v->text7.'</td>
                        <td>'.@$v->text8.'</td>
                        <td>'.@$v->text9.'</td>
                    </tr>
                    ';
                    $i++;
                }


                $html .='
                </tbody>
            </table>
        </div>
            ';

            return $html;

    }



}
